<?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;

class ModelServiceProvider extends ServiceProvider
{
    //register
    public function register()
    {
        $this->main();
        $this->game();
    }

    private function main()
    {
        $this->app->singleton('model_gift_backpack', \App\Models\MainDB\GiftBackpack::class);
        $this->app->singleton('model_gift', \App\Models\MainDB\Gift::class);
        $this->app->singleton('model_user_backpack_log', \App\Models\MainDB\UserBackpackLog::class);
        $this->app->singleton('model_user', \App\Models\MainDB\User::class);
        $this->app->singleton('model_user_account', \App\Models\MainDB\UserAccount::class);
        $this->app->singleton('model_account_log', \App\Models\MainDB\UserAccountLog::class);
        $this->app->singleton('model_config', \App\Models\MainDB\Config::class);
    }

    private function game()
    {
        $this->app->singleton('model_whole_game_check', \App\Models\GameDB\WholeGame\Check::class);
        $this->app->singleton('model_whole_game_check_record', \App\Models\GameDB\WholeGame\CheckRecord::class);
        $this->app->singleton('model_whole_game_check_repair', \App\Models\GameDB\WholeGame\CheckRepair::class);
        $this->app->singleton('model_whole_game_check_user', \App\Models\GameDB\WholeGame\CheckUser::class);

        //stellar game
        $this->app->singleton('model_stellar_pool_config', \App\Models\GameDB\Stellar\PoolConfig::class);
        $this->app->singleton('model_stellar_pool_user', \App\Models\GameDB\Stellar\PoolUser::class);
        $this->app->singleton('model_stellar_pool', \App\Models\GameDB\Stellar\Pool::class);
        $this->app->singleton('model_stellar_pool_prize', \App\Models\GameDB\Stellar\PoolPrize::class);
        $this->app->singleton('model_stellar_gift_template', \App\Models\GameDB\Stellar\GiftTemplate::class);
        $this->app->singleton('model_stellar_gift_config', \App\Models\GameDB\Stellar\GiftConfig::class);
        $this->app->singleton('model_stellar_pool_group', \App\Models\GameDB\Stellar\PoolGroup::class);
        $this->app->singleton('model_stellar_pool_template', \App\Models\GameDB\Stellar\PoolTemplate::class);
        $this->app->singleton('model_stellar_pool_draw', \App\Models\GameDB\Stellar\PoolDraw::class);
        $this->app->singleton('model_stellar_pool_draw_record', \App\Models\GameDB\Stellar\PoolDrawRecord::class);
        $this->app->singleton('model_stellar_pool_independent', \App\Models\GameDB\Stellar\PoolIndependent::class);
        $this->app->singleton('model_stellar_pool_independent_prize', \App\Models\GameDB\Stellar\PoolIndependentPrize::class);
        $this->app->singleton('model_stellar_statistics', \App\Models\GameDB\Stellar\Statics::class);
        $this->app->singleton('model_stellar_draw_add_pool_config', \App\Models\GameDB\Stellar\AddPoolConfig::class);
        $this->app->singleton('model_stellar_draw_add_pool_account', \App\Models\GameDB\Stellar\AddPoolAccount::class);
        $this->app->singleton('model_stellar_draw_add_pool_account_record', \App\Models\GameDB\Stellar\AddPoolAccountRecord::class);
        $this->app->singleton('model_stellar_draw_check', \App\Models\GameDB\Stellar\Check::class);
        $this->app->singleton('model_stellar_draw_check_record', \App\Models\GameDB\Stellar\CheckRecord::class);
        $this->app->singleton('model_stellar_appoint_gift', \App\Models\GameDB\Stellar\AppointGift::class);

        //frag game
        $this->app->singleton('model_frag_pool_config', \App\Models\GameDB\Frag\PoolConfig::class);
        $this->app->singleton('model_frag_pool_user', \App\Models\GameDB\Frag\PoolUser::class);
        $this->app->singleton('model_frag_pool', \App\Models\GameDB\Frag\Pool::class);
        $this->app->singleton('model_frag_pool_prize', \App\Models\GameDB\Frag\PoolPrize::class);
        $this->app->singleton('model_frag_gift_template', \App\Models\GameDB\Frag\GiftTemplate::class);
        $this->app->singleton('model_frag_gift_config', \App\Models\GameDB\Frag\GiftConfig::class);
        $this->app->singleton('model_frag_pool_group', \App\Models\GameDB\Frag\PoolGroup::class);
        $this->app->singleton('model_frag_pool_template', \App\Models\GameDB\Frag\PoolTemplate::class);
        $this->app->singleton('model_frag_pool_draw', \App\Models\GameDB\Frag\PoolDraw::class);
        $this->app->singleton('model_frag_pool_draw_record', \App\Models\GameDB\Frag\PoolDrawRecord::class);
        $this->app->singleton('model_frag_pool_independent', \App\Models\GameDB\Frag\PoolIndependent::class);
        $this->app->singleton('model_frag_pool_independent_prize', \App\Models\GameDB\Frag\PoolIndependentPrize::class);
        $this->app->singleton('model_frag_statistics', \App\Models\GameDB\Frag\Statics::class);
        $this->app->singleton('model_frag_draw_add_pool_config', \App\Models\GameDB\Frag\AddPoolConfig::class);
        $this->app->singleton('model_frag_draw_add_pool_account', \App\Models\GameDB\Frag\AddPoolAccount::class);
        $this->app->singleton('model_frag_draw_add_pool_account_record', \App\Models\GameDB\Frag\AddPoolAccountRecord::class);
        $this->app->singleton('model_frag_draw_check', \App\Models\GameDB\Frag\Check::class);
        $this->app->singleton('model_frag_draw_check_record', \App\Models\GameDB\Frag\CheckRecord::class);
        $this->app->singleton('model_frag_appoint_gift', \App\Models\GameDB\Frag\AppointGift::class);
        $this->app->singleton('model_frag_fragment_group', \App\Models\GameDB\Frag\FragmentGroup::class);
        $this->app->singleton('model_frag_fragment_user_record', \App\Models\GameDB\Frag\FragmentUserRecord::class);

    }
}
